package com.it.service.impl;

import com.it.dao.ListSongMapper;
import com.it.domain.ListSong;
import com.it.service.ListSongService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ListSongServImpl implements ListSongService {


    @Autowired
    private ListSongMapper listSongMapper;

    @Override
    public boolean AddListSong(ListSong listsong) {
        return listSongMapper.AddListSong(listsong)>0;
    }

    @Override
    public boolean UpdateListSong(ListSong listSong) {
        return listSongMapper.UpdateListSong(listSong)>0;
    }

    @Override
    public boolean DeleteListSong(Integer songId, Integer songListId) {
        return listSongMapper.DeleteListSong(songId,songListId)>0;
    }

    @Override
    public List<ListSong> SelectById(Integer songListId) {
        return listSongMapper.SelectById(songListId);
    }

    @Override
    public List<ListSong> SelectAll() {
        return listSongMapper.SelectAll();
    }

    @Override
    public Integer GetSongTotal(Integer songListId) {
        return listSongMapper.GetSongTotal(songListId);
    }

    @Override
    public List<ListSong> SelectBySongListId(Integer songListId) {
        return listSongMapper.SelectBySongListId(songListId);
    }
}
